-
Notifications
You must be signed in to change notification settings - Fork 16
BUG: Fix delegation behaviour with atleast_3d
#514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
lucascolley
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
I wonder whether, rather than checking for exact equality in all of these tests, we should just check for expected shapes? Probably good to still keep one sanity-check test that we aren't unexpectedly modifying the values, but otherwise the tests are quite verbose.
Thoughts @Enderdead ?
|
@lucascolley You're right — it will be easier to understand and maintain. I'll propose another version ASAP. |
|
@lucascolley I’m proposing this new version with a hash method to perform a semi–sanity check. |
atleast_3d.atleast_3d
lucascolley
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @Enderdead, I like the approach!
atleast_3datleast_3d
5e8920c to
5c0889d
Compare
|
I replaced the Do you want me to add |
|
since |
This PR fixes the bad behavior reported in scipy/scipy#23929 when
ndim=3.It removes delegation when
ndim> 2 and adds additional tests.These tests reproduce the issue while avoiding input arrays of size 1.
I'm not entirely happy with these new tests, but they provide a reasonable starting point for further iteration.
Feedback is welcome.